﻿using SharpDepend.Datatypes;
using SoundEngine3.SequenceContent;
using System;
using ZquenceStudio3Host.DspPlugins.Synthesizers.Nodesizer.Engine;
using ZquenceStudio3Host.Graphics.Components;
using ZquenceStudio3Host.Graphics.GUI;

namespace DefaultDspPlugins.UI.Common.Modulizer.Engine.GUIv2.Sequencer
{
    public class TrackModulePanel : Panel, ITransformSequenceObject
    {
        private BaseModule mModule;

        public BaseModule Module
        {
            get
            {
                return mModule;
            }
        }

        public TrackModulePanel(BaseModule module, BasicGuiManager engineCore)
            : base(engineCore, true)
        {
            mModule = module;

            BackgroundColor = Color.Gray;
        }

        public double Start
        {
            get
            {
                return Module.GuiPosition.X;
            }
            set
            {
                Module.GuiPosition.X = value;
            }
        }

        public double Length
        {
            get
            {
                return Module.GuiPosition.Width;
            }
            set
            {
                Module.GuiPosition.Width = value;
            }
        }

        public double DisplayLength
        {
            get
            {
                return Module.GuiPosition.Width;
            }
            set
            {
                Module.GuiPosition.Width = value;
            }
        }

        public double HeightPosition
        {
            get
            {
                return Module.GuiPosition.Y;
            }
            set
            {
                Module.GuiPosition.Y = value;
            }
        }

        public double DisplayHeight
        {
            get
            {
                return Module.GuiPosition.Height;
            }
            set
            {
                Module.GuiPosition.Height = value;
            }
        }

        public void Removed()
        {
            throw new NotImplementedException();
        }
    }
}
